@import '~antd/es/style/themes/default.less';

@font-face {
  font-family: 'PingFangSCRegular';
  src: url('/fonts/PingFangSCRegular.ttf');
  font-weight: border;
  font-style: normal;
}

html,
body,
#root {
  font-family: Microsoft Yahei, Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
  height: 100%;
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
  list-style: none;
}

:global {
  .ant-input-lg,
  .ant-select-lg,
  .ant-time-picker-large .ant-time-picker-input {
    font-size: 14px !important;
  }
  .ant-cascader-picker-disabled {
    background-color: #fff !important;
    color: rgba(0, 0, 0, 0.65) !important;
    cursor: default !important;
  }
  .ant-input[disabled] {
    background-color: #fff !important;
    color: rgba(0, 0, 0, 0.65) !important;
    cursor: default !important;
  }
  .ant-input-number-disabled {
    background-color: #fff !important;
    color: rgba(0, 0, 0, 0.65) !important;
    cursor: default !important;
  }
  .ant-select-disabled {
    color: rgba(0, 0, 0, 0.65) !important;
    .ant-select-selection {
      background-color: #fff !important;
      cursor: default !important;
    }
  }
  .ant-spin-nested-loading > div > .ant-spin {
    max-height: unset;
  }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background-color: hsla(0, 0%, 100%, 0.25);
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 3px;
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;
    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;
        > span {
          display: block;
        }
      }
    }
  }
}

// 兼容IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}
